class UserCouponListEntity {
  UserCouponListData data;
  int code;
  String msg;

  UserCouponListEntity({this.data, this.code, this.msg});

  UserCouponListEntity.fromJson(Map<String, dynamic> json) {
    data = json['data'] != null
        ? new UserCouponListData.fromJson(json['data'])
        : null;
    code = json['code'];
    msg = json['msg'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data']['list'] = this.data.toJson();
    }
    data['code'] = this.code;
    data['msg'] = this.msg;
    return data;
  }
}

class UserCouponListData {
  List<UserCouponListDataData> datas;

  UserCouponListData();

  UserCouponListData.fromJson(Map<String, dynamic> json) {
    if (json['list'] != null) {
      datas = new List<UserCouponListDataData>();
      (json['list'] as List).forEach((v) {
        datas.add(new UserCouponListDataData.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datas != null) {
      data['list'] = this.datas.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class UserCouponListDataData {
// id
// 收货地址ID
// coupon_id
// 用户ID
// coupon_record_id
// 省份
// type
// 城市
// is_used
// 城市
// use_time
// 详细地址
// company
// 单位名称
// name
// 收件人
// money
// 联系电话
// postcode
// 邮编
// condition_money
// 是否为默认地址 Y是 N否

  String id;
  String coupon_id;
  String coupon_record_id;
  String type;
  String is_used;
  String use_time;
  String name;
  String money;
  String condition_money;
  String use_start_time;
  String use_end_time;
  String goods_id;
  String goods_name;
  UserCouponListDataData({
    this.id,
    this.condition_money,
    this.use_start_time,
    this.use_end_time,
    this.goods_id,
    this.goods_name,
    this.coupon_id,
    this.coupon_record_id,
    this.type,
    this.is_used,
    this.use_time,
    this.name,
    this.money,
  });

  UserCouponListDataData.fromJson(Map<String, dynamic> json) {
    use_start_time = json['create_time'].toString();
    use_end_time = json['end_time'].toString();
    goods_id = json['goods_id'].toString();
    goods_name = json['goods_name'].toString();
    coupon_id = json['coupon_id'].toString();
    coupon_record_id = json['coupon_record_id'].toString();
    type = json['type'].toString();
    is_used = json['is_used'].toString();
    use_time = json['use_time'];
    id=json['id'].toString();
    name = json['activity_name'];
    money = json['coupons'].toString();
    condition_money = json['coupons'].toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['coupon_id'] = this.coupon_id;
    data['coupon_record_id'] = this.coupon_record_id;
    data['type'] = this.type;
    data['is_used'] = this.is_used;
    data['use_time'] = this.use_time;
    data['money'] = this.money;
    data['name'] = this.name;
    data['condition_money'] = this.condition_money;

    return data;
  }
}
